{include(head.tpl)}
<body>

  <div class="wrapper-content">
      <div class="animated fadeInDown wrap">

          <table class="table_value table">
            <tr>
              <th>ID</th>
              <th>用户名</th>
              <th>登陆IP</th>
              <th>客服端来源</th>
              <th>登陆URL</th>
              <th>登陆结果</th>
              <th>登陆时间</th>
            </tr>
            {foreach from=listarr item=vo}
            <tr>
              <td>{$vo.id}</td>
              <td>{$vo.username}</td>
              <td>{$vo.userip}</td>
              <td>{$vo.from}</td>
              <td>{$vo.loginurl}</td>
              <td>{if $vo['result']==1}成功{/else}失败{/if}</td>
              <td><?php echo date('Y-m-d H:i:s',$vo['logintime']) ;?></td>
            </tr>
            {/foreach}
            </table>
            <div class="page">{pageshow}</div>
        </div>
</div>
<script>
  function ajaxpage(page){
      var url='page='+page;
      _ajaxs.post('{mothedurl}',url,function _return(hdata){
          var pageh=pagehead();
          var pagec=pagecontent(hdata);
          $('.table_value').html('');
          $('.table_value').html(pageh+pagec);
          $('.page').html('');
          $('.page').html(hdata.data.pageshow);
      })
  }
  function pagehead(){
      var pageheadhtml='<tr>\
        <th>ID</th>\
        <th>用户名</th>\
        <th>登陆IP</th>\
        <th>客服端来源</th>\
        <th>登陆URL</th>\
        <th>登陆结果</th>\
        <th>登陆时间</th>\
      </tr>';
      return pageheadhtml;
  }
  function pagecontent(hdata){
      var list=hdata.data.list;
      var pagecontenthtml='';
      if(list!=''){
        for(i=0;i<list.length;i++){
          pagecontenthtml+='<tr>\
            <td>'+list[i]['id']+'</td>\
            <td>'+list[i]['username']+'</td>\
            <td>'+list[i]['userip']+'</td>\
            <td>'+list[i]['from']+'</td>\
            <td>'+list[i]['loginurl']+'</td>\
            <td>';
            if(list[i]['result']==1){
                pagecontenthtml+='成功';
            }else{
                pagecontenthtml+='失败';
            }
          pagecontenthtml+='</td>\
            <td>'+_myTime.UnixToDate(list[i]['logintime'],true,8)+'</td>\
          </tr>';
        }
      }
      return pagecontenthtml;

  }
</script>
</body>
</html>
